# load libraries
library(tidyverse)
library(here)


# read in the rural data
clean_df = read_rds(here("replication", "data", "endorse-data.rds"))




# Endorsement experiment ------------------------------------------------------------


m1 = lm(endorse_food ~ endorse_treat*displace, data = clean_df)
m2 = lm(endorse_coca ~ endorse_treat*displace, data = clean_df)
m3 = lm(endorse_land ~ endorse_treat*displace, data = clean_df)


stargazer::stargazer(m1, m2, m3, title = "Endorsement experiment results. Models interact FARC endorsement treatment with displacement status.",
                     keep = ":", keep.stat = "n",
                     dep.var.labels = c("Agr. policy", "Coca policy", "Land policy"),
                     covariate.labels = c("endorse_treat:displace" = "Endorse treatment X displaced"), 
                     label = "tab:end", out = here("replication", 
                                                   "figures", "tab-end.tex"))
